<!DOCTYPE html>

<!--在线考试-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <el-col span="24">
            <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight" border
                @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;height: 100%;">
                <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                    show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Titleofexamination" :label="EducationExamination.Titleofexamination">
                </el-table-column>
                <el-table-column prop="rightkey" :label="EducationExamination.rightkey" width="100">
                </el-table-column>
                <el-table-column prop="Mychoice" :label="EducationExamination.Mychoice" width="100">
                    <template scope="scope">
                        <span v-if="scope.row.Mychoice == scope.row.rightkey"
                            style="color:#37B328">{{ scope.row.Mychoice }}</span>
                        <span v-else style="color: red">{{ scope.row.Mychoice }}</span>
                    </template>
                </el-table-column>
            </el-table>
            <el-row type="flex" justify="end">
                <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                    :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                    :layout="ListItem.layout" :total="ListItem.total">
                </el-pagination>
            </el-row>
            <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  -->
            <br>

        </el-col>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                ListItem: ListItem,
                Trainingcontent: [],
                isShow: true,
                formInline: {
                    // 遍历所有列 均为字符串即可
                    model: {
                        Name: '', Category: '', Teacher: '', LlearningTime: '', Courseware: '', IsEncrypted: '',
                    },
                    offset: 0,
                    limit: 10
                }
            },
            mounted: function () {
                this.GetPageData(1);
                // tablehigh(this);
                this.Trainingcontent = getDicData('66');
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                closeDialog: function () { closeDialog(this); },
                //Model 替换成 表名
                //Model 替换成 表名
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/EducationExamination/GetList') },

                onSubmit: function () { onSubmit(this); },

                handleSizeChange: function (val) { handleSizeChange(this, val); },

                handleCurrentChange: function (val) { handleCurrentChange(this, val); },

                handleNodeClick: function (data) {
                    this.formInline.model.Category = data.id;
                    this.GetPageData(1);
                }
            }
        });
    </script>
</body>

</html>